﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace EmployeeSystem.Models
{
    /// <summary>
    /// 员工
    /// </summary>
    public class Employee
    {
        /// <summary>
        /// 员工ID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 外部ID（公司员工号）
        /// </summary>
        [Display(Name="员工号")]
        [Required]
        public string ExternalId { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        [Display(Name = "姓名")]
        [Required]
        public string Name { get; set; }

        /// <summary>
        /// 职务
        /// </summary>
        [Display(Name = "职务")]
        public virtual Job Job { get; set; }

        /// <summary>
        /// 职务ID
        /// </summary>
        public Guid JobId { get; set; }

        /// <summary>
        /// 部门
        /// </summary>
        [Display(Name = "部门")]
        public virtual Department Department { get; set; }

        /// <summary>
        /// 部门ID
        /// </summary>
        public Guid DepartmentId { get; set; }

        /// <summary>
        /// 合同
        /// </summary>
        public virtual Contract Contract { get; set; }
    }
}